In this python project, we sort files in a folder moving them to associated folders creating an automatic file sorting system. Here is a step to step walk through of the project.
We start by importing the relevant python modules that will be used to create this system. These modules are; os and shutil. The os module provides a way to interact with the operating system and the shutil module provides a higher level of operation than the os module and it is used for copying and removing files and directories among other things.
The next stop was to define the path of the folder with the files We want to sort.
I then tried to find out the files present in the path defined and assigned a variable to it.
I then wrote a code to create folders that will be used to hold files of similar properties.
We then move files the files to the created folders by first confirming if the files exist in the new created folder and if not, it is then moved.
To download and view the full project on GitHub, click here.